/*
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2022-12-20 15:47:46
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2022-12-20 16:19:07
 */
import request, { http } from '@/service/index'
import type { AxiosPromise } from 'axios'
import type { LoginData, LoginRes, UserInfoRes,Nulls} from './types'


/**
 * 登录
 */
export function login(data: LoginData) {
  return http.post<LoginRes>('/user/login', data);
}

// 使用原生 axios 实例进行请求
export function loginRaw(data: LoginData): Promise<LoginRes> {
  return request.post('/user/login', data);
}

/**
 * 获取登录用户信息
 */
export const  StaffBasic = (params:Nulls)=> http.post<Nulls>('/itCenter/api/Staff/StaffBasic',params).then(res=>res.data)